import  instorageState from '../state/instorageState'
import instorageMethod from '../method/instorageMethod'


const reducer = (state = instorageState, action)=>{
  console.log(instorageMethod[action.type])
  try{
    return instorageMethod[action.type](state,action.data)
  }catch(e){

    return state
  }
}

export default reducer